#include "string.h"

WX::string::string(const char* str)
	:_size(strlen(str))
{
	_capacity = _size;
	_str = new char[_size + 1];
	strcpy(_str, str);
}

//WX::string::string(const std::string& str)
//{
//	
//}

WX::string::~string()
{
	delete[] _str;
	_str = nullptr;
	_capacity = _size = 0;
}

void test5()
{
	WX::string sx1("12345");
	cout << sx1.c_str() << endl;
	WX::string sx2;
	cout << sx2.c_str() << endl;
	
}